import { config } from '../../config/index';
import { request } from '../../utils/request'
import { api } from '../../config/api'
/** 获取个人中心信息 */
function mockFetchUserCenter() {
  const { delay } = require('../_utils/delay');
  const { genUsercenter } = require('../../model/usercenter');
  return delay(200).then(() => genUsercenter());
}

/** 获取个人中心信息 */
export function fetchUserCenter() {
  // if (config.useMock) {
  //   return mockFetchUserCenter();
  // }
  return request.get(api.user.my);
}
